package com.ruoyi.platform.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 优惠券管理对象 coupon_management
 * 
 * @author ruoyi
 * @date 2024-01-01
 */
public class CouponManagement extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 优惠券ID */
    private String couponId;

    /** 优惠券编码（唯一） */
    @Excel(name = "优惠券编码")
    private String couponCode;

    /** 优惠券名称 */
    @Excel(name = "优惠券名称")
    private String couponName;

    /** 优惠券类型：1-满减券，2-折扣券，3-免费券，4-新用户券 */
    @Excel(name = "优惠券类型", readConverterExp = "1=满减券,2=折扣券,3=免费券,4=新用户券")
    private Integer couponType;

    /** 商家ID */
    @Excel(name = "商家ID")
    private String merchantId;

    /** 商家名称 */
    @Excel(name = "商家名称")
    private String merchantName;

    /** 优惠金额（满减券使用） */
    @Excel(name = "优惠金额")
    private BigDecimal discountAmount;

    /** 折扣率（折扣券使用，如0.8表示8折） */
    @Excel(name = "折扣率")
    private BigDecimal discountRate;

    /** 最低订单金额 */
    @Excel(name = "最低订单金额")
    private BigDecimal minOrderAmount;

    /** 最高优惠金额 */
    @Excel(name = "最高优惠金额")
    private BigDecimal maxDiscountAmount;

    /** 发放总数量 */
    @Excel(name = "发放总数量")
    private Integer totalQuantity;

    /** 已使用数量 */
    @Excel(name = "已使用数量")
    private Integer usedQuantity;

    /** 剩余数量 */
    @Excel(name = "剩余数量")
    private Integer remainingQuantity;

    /** 每用户限领数量 */
    @Excel(name = "每用户限领数量")
    private Integer perUserLimit;

    /** 有效期开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "有效期开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date validStartTime;

    /** 有效期结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "有效期结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date validEndTime;

    /** 领取开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "领取开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date receiveStartTime;

    /** 领取结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "领取结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date receiveEndTime;

    /** 适用范围：1-全部商品，2-指定商品，3-指定分类 */
    @Excel(name = "适用范围", readConverterExp = "1=全部商品,2=指定商品,3=指定分类")
    private Integer applicableScope;

    /** 范围ID列表（商品ID或分类ID） */
    @Excel(name = "范围ID列表")
    private String scopeIds;

    /** 优惠券描述 */
    @Excel(name = "优惠券描述")
    private String description;

    /** 使用规则 */
    @Excel(name = "使用规则")
    private String usageRules;

    /** 状态：0-待审核，1-审核通过，2-审核拒绝，3-已发布，4-已暂停，5-已过期 */
    @Excel(name = "状态", readConverterExp = "0=待审核,1=审核通过,2=审核拒绝,3=已发布,4=已暂停,5=已过期")
    private Integer status;

    /** 审核状态：0-待审核，1-审核通过，2-审核拒绝 */
    @Excel(name = "审核状态", readConverterExp = "0=待审核,1=审核通过,2=审核拒绝")
    private Integer approvalStatus;

    /** 审核人ID */
    @Excel(name = "审核人ID")
    private Long approvalBy;

    /** 审核时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date approvalAt;

    /** 审核备注 */
    @Excel(name = "审核备注")
    private String approvalRemark;

    /** 拒绝原因 */
    @Excel(name = "拒绝原因")
    private String rejectReason;

    /** 删除时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date deletedAt;

    public void setCouponId(String couponId) 
    {
        this.couponId = couponId;
    }

    public String getCouponId() 
    {
        return couponId;
    }
    public void setCouponCode(String couponCode) 
    {
        this.couponCode = couponCode;
    }

    public String getCouponCode() 
    {
        return couponCode;
    }
    public void setCouponName(String couponName) 
    {
        this.couponName = couponName;
    }

    public String getCouponName() 
    {
        return couponName;
    }
    public void setCouponType(Integer couponType) 
    {
        this.couponType = couponType;
    }

    public Integer getCouponType() 
    {
        return couponType;
    }
    public void setMerchantId(String merchantId) 
    {
        this.merchantId = merchantId;
    }

    public String getMerchantId() 
    {
        return merchantId;
    }
    public void setMerchantName(String merchantName) 
    {
        this.merchantName = merchantName;
    }

    public String getMerchantName() 
    {
        return merchantName;
    }
    public void setDiscountAmount(BigDecimal discountAmount) 
    {
        this.discountAmount = discountAmount;
    }

    public BigDecimal getDiscountAmount() 
    {
        return discountAmount;
    }
    public void setDiscountRate(BigDecimal discountRate) 
    {
        this.discountRate = discountRate;
    }

    public BigDecimal getDiscountRate() 
    {
        return discountRate;
    }
    public void setMinOrderAmount(BigDecimal minOrderAmount) 
    {
        this.minOrderAmount = minOrderAmount;
    }

    public BigDecimal getMinOrderAmount() 
    {
        return minOrderAmount;
    }
    public void setMaxDiscountAmount(BigDecimal maxDiscountAmount) 
    {
        this.maxDiscountAmount = maxDiscountAmount;
    }

    public BigDecimal getMaxDiscountAmount() 
    {
        return maxDiscountAmount;
    }
    public void setTotalQuantity(Integer totalQuantity) 
    {
        this.totalQuantity = totalQuantity;
    }

    public Integer getTotalQuantity() 
    {
        return totalQuantity;
    }
    public void setUsedQuantity(Integer usedQuantity) 
    {
        this.usedQuantity = usedQuantity;
    }

    public Integer getUsedQuantity() 
    {
        return usedQuantity;
    }
    public void setRemainingQuantity(Integer remainingQuantity) 
    {
        this.remainingQuantity = remainingQuantity;
    }

    public Integer getRemainingQuantity() 
    {
        return remainingQuantity;
    }
    public void setPerUserLimit(Integer perUserLimit) 
    {
        this.perUserLimit = perUserLimit;
    }

    public Integer getPerUserLimit() 
    {
        return perUserLimit;
    }
    public void setValidStartTime(Date validStartTime) 
    {
        this.validStartTime = validStartTime;
    }

    public Date getValidStartTime() 
    {
        return validStartTime;
    }
    public void setValidEndTime(Date validEndTime) 
    {
        this.validEndTime = validEndTime;
    }

    public Date getValidEndTime() 
    {
        return validEndTime;
    }
    public void setReceiveStartTime(Date receiveStartTime) 
    {
        this.receiveStartTime = receiveStartTime;
    }

    public Date getReceiveStartTime() 
    {
        return receiveStartTime;
    }
    public void setReceiveEndTime(Date receiveEndTime) 
    {
        this.receiveEndTime = receiveEndTime;
    }

    public Date getReceiveEndTime() 
    {
        return receiveEndTime;
    }
    public void setApplicableScope(Integer applicableScope) 
    {
        this.applicableScope = applicableScope;
    }

    public Integer getApplicableScope() 
    {
        return applicableScope;
    }
    public void setScopeIds(String scopeIds) 
    {
        this.scopeIds = scopeIds;
    }

    public String getScopeIds() 
    {
        return scopeIds;
    }
    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }
    public void setUsageRules(String usageRules) 
    {
        this.usageRules = usageRules;
    }

    public String getUsageRules() 
    {
        return usageRules;
    }
    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }
    public void setApprovalStatus(Integer approvalStatus) 
    {
        this.approvalStatus = approvalStatus;
    }

    public Integer getApprovalStatus() 
    {
        return approvalStatus;
    }
    public void setApprovalBy(Long approvalBy) 
    {
        this.approvalBy = approvalBy;
    }

    public Long getApprovalBy() 
    {
        return approvalBy;
    }
    public void setApprovalAt(Date approvalAt) 
    {
        this.approvalAt = approvalAt;
    }

    public Date getApprovalAt() 
    {
        return approvalAt;
    }
    public void setApprovalRemark(String approvalRemark) 
    {
        this.approvalRemark = approvalRemark;
    }

    public String getApprovalRemark() 
    {
        return approvalRemark;
    }
    public void setRejectReason(String rejectReason) 
    {
        this.rejectReason = rejectReason;
    }

    public String getRejectReason() 
    {
        return rejectReason;
    }
    public void setDeletedAt(Date deletedAt) 
    {
        this.deletedAt = deletedAt;
    }

    public Date getDeletedAt() 
    {
        return deletedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("couponId", getCouponId())
            .append("couponCode", getCouponCode())
            .append("couponName", getCouponName())
            .append("couponType", getCouponType())
            .append("merchantId", getMerchantId())
            .append("merchantName", getMerchantName())
            .append("discountAmount", getDiscountAmount())
            .append("discountRate", getDiscountRate())
            .append("minOrderAmount", getMinOrderAmount())
            .append("maxDiscountAmount", getMaxDiscountAmount())
            .append("totalQuantity", getTotalQuantity())
            .append("usedQuantity", getUsedQuantity())
            .append("remainingQuantity", getRemainingQuantity())
            .append("perUserLimit", getPerUserLimit())
            .append("validStartTime", getValidStartTime())
            .append("validEndTime", getValidEndTime())
            .append("receiveStartTime", getReceiveStartTime())
            .append("receiveEndTime", getReceiveEndTime())
            .append("applicableScope", getApplicableScope())
            .append("scopeIds", getScopeIds())
            .append("description", getDescription())
            .append("usageRules", getUsageRules())
            .append("status", getStatus())
            .append("approvalStatus", getApprovalStatus())
            .append("approvalBy", getApprovalBy())
            .append("approvalAt", getApprovalAt())
            .append("approvalRemark", getApprovalRemark())
            .append("rejectReason", getRejectReason())
            .append("createdBy", getCreateBy())
            .append("createdAt", getCreateTime())
            .append("updatedBy", getUpdateBy())
            .append("updatedAt", getUpdateTime())
            .append("deletedAt", getDeletedAt())
            .toString();
    }
}